export default {
  state: {
    layout: 'top',
    tabType: 'tab-nav', // 导航模式
    activedTabs: [ // 记录被打开过的菜单
      {
        label: 'HOME',
        name: 'HOME',
        path: '/index'
      }
    ],
    currentTab: '' // 当前选中的tab
  },
  getters: {
    layout: (state) => state.layout,
    getTabType: state => state.tabType,
    getActivedTabs: state => state.activedTabs,
    getCurrentTab: state => state.currentTab
  },
  mutations: {
    SET_LAYOUT: (state, data) => (state.layout = data),
    SET_TABTYPE: (state, tab) => (state.tabType = tab)
  },
}
